
<div id="header">

    <h1>CMS</h1>

    <? if (admin_session_check()) { ?>

    <div id="menu">
        <a href="<?=site_url('admin/products')?>" <?if(@$selected=="products") print 'class="selected"'?>>PRODUCTS AREA</a>
        <a href="<?=site_url('admin/about')?>" <?if(@$selected=="pages") print 'class="selected"'?>>SITE PAGES</a>
        <a href="<?=site_url('admin/insiders')?>" <?if(@$selected=="insiders") print 'class="selected"'?>><?=strtoupper(INSTANCE_NAME)?> INSIDERS</a>

        <? if(is_allowed(array(ROLE_ADMIN))) {?>                                                                      
        <a href="<?=site_url('admin/users')?>" class="last <?if(@$selected=="users") print ' selected'?>">ADMIN USERS</a>
        <? } ?>

        <!--
        <a href="<?=site_url('admin/newsletter')?>" <?if(@$selected=="newsletter") print 'class="selected"'?>>NEWSLETTER</a>
        <a href="<?=site_url('admin/config')?>" class="last <?if(@$selected=="config") print ' selected'?>">CONFIG</a>
        -->

         
        <a href="<?=site_url('admin/login/logout')?>" class="last" style="float:right">LOGOUT</a> 
        <a href="<?=site_url('admin/users/edit_profile')?>" style="float:right"><?=$this->session->userdata("admin_username")?></a> 
    
    </div>

    <? } ?>

</div>

